package com.xiangyi.teachingsystem.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xiangyi.teachingsystem.entity.po.Course;
import com.xiangyi.teachingsystem.entity.po.CourseUser;
import com.xiangyi.teachingsystem.entity.vo.Result;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface CourseUserService extends IService<CourseUser> {

    @Transactional
    void addUsersToCourse(List<CourseUser> courseUsers);

    Result joinCourseUser(Integer userId, String sign);

    List<CourseUser> usersList(Integer courseId);

    List<Course> joinCourseList(Integer userId);
}
